using System;
using System.Collections.Generic;
using System.Text;

namespace GoogleTranslator
{
	public class TranslationResult
	{
		public TranslationResult() {
			_responseData = new ResponseData();
		}

		public ResponseData responseData {
			get { return _responseData; }
			set {
				_responseData = value == null ? new ResponseData() : value;
			}
		}

		public string responseDetails {
			get { return _responseDetails; }
			set { _responseDetails = value; }
		}
		
		public int responseStatus {
			get { return _responseStatus; }
			set { _responseStatus = value; }
		}

		public new string ToString() {
			return string.Format("responseData: [{0}]; responseStatus: [{1}]; responseDetails: [{2}]", _responseData.ToString(), _responseStatus, _responseDetails);
		}

		private ResponseData _responseData;
		private string _responseDetails;
		private int _responseStatus;
	}

	public class ResponseData
	{
		public ResponseData() { }

		public string translatedText {
			get { return _translatedText; }
			set { _translatedText = value; }
		}

		public new string ToString() {
			return "translatedText: '" + _translatedText + "'";
		}

		private string _translatedText;
	}
}
